package ch03.service;

import ch03.Impl.NewsDaoImpl;
import ch03.dao.NewsDao;
import ch03.jopo.News;

public class NewsServiceImpl implements NewsService {
    //实例化所依赖的NewsDao对象
  //  private NewsDao dao = new NewsDaoImpl();
    private NewsDao dao;
    public void setDao(NewsDao dao){
        this.dao = dao;
    }

    @Override
    public void save(News news) {
        dao.sava(news);
    }
}
